{template wl_header} 
<link href='{RES}css/cart.css?<?=time()?>' rel='stylesheet' type='text/css' />

<link rel="stylesheet" type="text/css" href="{RES}css/wei_canyin.css?<?=time()?>" media="all" />
<link rel="stylesheet" type="text/css" href="{RES}css/wei_dialog.css" media="all" />
<link rel="stylesheet" type="text/css" href="{RES}css/datepicker_canyin.css" media="all" />

<script type="text/javascript" src="{RES}js/wei_webapp_v2_common.js"></script>
<script type="text/javascript" src="{RES}js/bootstrap-datepicker_canyin.js"></script>

<!--script language="javascript">$(document).ready(shop_obj.payment_init);</script-->

<div id="shop_page_contents">
	<div id="cover_layer"></div>
	{template wl_menu} 
	<div id="payment">
		<div class="i-ture">
			<div class="info">
				订 单 号：{$order['ordersn']}<br />
                订单总额：<span class="fc_red">￥{php echo number_format($order['amount'],2)}</span>
				预付金额：<span class="fc_red">￥{php echo number_format($order['totalprice'],2)}</span>
			</div>
		</div>
		<form id="payment_form" action="{php echo $this->createMobileUrl('wlpayment');}" method="post">
            <div class="i-ture">
            
				<h1 class="t">选择支付方式</h1>
				<ul>
					<li><input type="radio" name="paytype" value="2" id="zfb" checked /> <label for="zfb"><strong>微信支付</strong></label></li>
					<li><input type="radio" name="paytype" value="5" id="zfb"  /> <label for="zfb"><strong>上门收取</strong></label></li>

				</ul>
            <table class="table_book">
                <tr>
                    <td style="width:80px;">我的优惠券：</td>
                    <td colspan="2" style="position: relative;">
                    <input  name="coupon" id="coupon" value=""  maxlength="10" style="width:100%;" class="input_text" oninput="" />
                    </td>
                </tr>                
             </table>   
			</div>
            <div class="i-ture">
            <h1 class="t">客户信息</h1>
            <ul>
            <li>

            </li>
            </ul>
            <table class="table_book">
                    {if  $order[waiter]>0 }
                    <tr>
                    <td style="width:80px;">服务员人数：</td>
                    <td colspan="2">{$order[waiter]}                 
                    </td>
                    </tr> 
                    {/if}   
                    {if  $order[dishware]>0 }
                    <tr>
                    <td style="width:80px;">烹饪器具：</td>
                    <td colspan="2">{$order[dishware]}套                 
                    </td>
                    </tr> 
                    {/if}                       
                              
                    <tr>
                    <td style="width:80px;">您的姓名：</td>
                    <td colspan="2">{$order[guest_name]}                 
                    </td>
                    </tr>            
                    <tr>
                    <td style="width:80px;">联系手机号：</td>
                    <td colspan="2">
                       {$order[tel]}
                    </td>
                 </tr>
                <tr>
                    <td style="width:80px;">预定人数：</td>
                    <td colspan="2">
                     {$order[custnums]}
                    </td>
                </tr>
                <tr>
                    <td width="80px" style="width:80px;">预约日期：</td>
                    <td colspan="2">
                    {$order[time_day]}
                    </td>
                </tr>   
                <tr>
                    <td width="80px" style="width:80px;">详细地址：</td>
                    <td colspan="2">
                    {$order[guest_address]}
                    </td>
                </tr>                      
            <tr>
                    <td style="width:80px;vertical-align:top;line-height:25px;">备注说明：</td>
                    <td colspan="2">
                    {$order[remark]}
                    </td>
                </tr>                           
                </table>            
            </div>
			<div class="payment"><input type="submit" value="下一步"  id="submit_form" /></div>
			<input type="hidden" name="orderid" value="{$order['id']}" />
			<input type="hidden" name="d" value="payment" />
		</form>
	</div>
</div>
<link rel="stylesheet" type="text/css" href="{RES}css/wei_canyin.css" media="all" />
<div class="center">
{template wl_footer} 
<script>
    window.addEventListener("DOMContentLoaded", function() {
        var now = new Date();
        var nowArr = [now.getFullYear(), now.getMonth() + 1, now.getDate()];
        $("#dpd1").each(function(k, v) {
            var ndate = $(v).datepicker({
                format: "yyyy/mm/dd",
                onRender: function(date) {
                    var t1 = new Date(date.valueOf());
                    var t2 = new Date(now.valueOf());
                    t1 = t1.getFullYear() + "/" + (t1.getMonth() + 1) + "/" + t1.getDate();
                    t2 = t2.getFullYear() + "/" + (t2.getMonth() + 1) + "/" + t2.getDate();
                    return (t1 != t2 && (date.valueOf() < now.valueOf())) ? 'disabled' : '';
                }
            }).on("changeDate", function(date) {
                if ('days' == date.viewMode) {
                    ndate.datepicker('hide');
                }
            });
           // v.value = nowArr.join("/");
        });
        //
    }, false);
    window.addEventListener("DOMContentLoaded", function() {
        
    }, false);
            
            var footer = document.getElementById("footer_menu");
            var evtObj = {
                handleEvent: function(evt){
                    if("A" == evt.target.tagName){
                        evt.target.classList.toggle("on");
                    }
                }
            }
            footer.addEventListener("touchstart", evtObj, false);
            footer.addEventListener("touchend", evtObj, false);
        </script>
        

<script type="text/javascript">
    $(function() {
        $('#submit_form').click(function() {
            
            
//            if (null == $('#tel').val().match(/^1\d{10,13}$/g)) {
//                alert("请输入正确的手机号");return false;
//                MDialog.alert(null, "请输入正确的手机号", null, "确定");
//                return false;
//            }
            
//            if($("#guest_name").val() == ''){
//                alert("请输入用户姓名");return false;
//                MDialog.alert(null, "请输入用户姓名", null, "确定");
//                return false;
//            }
  
        });
    });

</script>
        
    </div>

